#include<iostream>
using namespace std;
unsigned P(int n,double x);

int main()
{
	double n, x = 0;
	cin >> x >> n;
	cout << P(n, x);
	system("pause");
	return 0;
}
unsigned P(int n, double x)
{
	if (n == 0)
	{
		return 1;
	}
	else
		if (n == 1)
		{
			return x;
		}
		else
		{
			return((2 * n - 1)*x*P(n - 1, x) - (n - 1)*P(n - 2, x)) / n;
		}
}